extends Talent

func init():
	name = "技能大师"
func _connect():
	sys.main.connect("onBattleStart",self,"run5")
	sys.main.connect("onCharaNewChara", self, "onCharaNewChara")

func onCharaNewChara(cha):
	if cha.team == 1:
		cha.addBuff(b_jinengdashi.new(lv))	

func run5():
	for i in sys.main.btChas:
		if i.team == 1:
			i.addBuff(b_jinengdashi.new(lv))
#12 14 16 18 20
func get_info():
	return "我方角色(含召唤物)造成的技能伤害提高[%d%%]"%[10+2*lv]

class b_jinengdashi extends "../../azurlane_ctrl/AzurBuff.gd":
	var tlv = 1
	func _init(tlv):
		attInit()
		id = "b_jinengdashi"
		dispel = 2
		self.tlv = tlv
	func _connect():
		masCha.connect("onAtkChara",self,"_onAtkChara")
	func _onAtkChara(atkInfo):
		if atkInfo.atkType == sys.AtkType.SKILL:
			atkInfo.factor += (0.10 + tlv*0.02)
